package cn.green.busi.auth.entity;

import cn.green.components.model.SysUser;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;
import java.util.Collections;

/**
 * @author wang.yishu
 * @version 1.0
 * @className OAuthUser
 * @description TODO
 * @date 2023/1/3 15:19
 */
public class OAuthUser extends User {

    private SysUser sysUser;

    public OAuthUser(SysUser sysUser) {
        super(sysUser.getUsername(), sysUser.getPassword(),
                true, true, true, true, Collections.emptyList());
        this.sysUser = sysUser;
    }

    public SysUser getSysUser() {
        return sysUser;
    }

    public void setSysUser(SysUser sysUser) {
        this.sysUser = sysUser;
    }
}
